package com.ysd.lis.controller;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.WkKnowledgeIssue;
import com.ysd.lis.service.WkKnowledgeIssueService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 员工表
 * 前端控制器
 * </p>
 *
 * @author peng
 * @since 2024-03-12
 */
@Api(tags = "知识库相关问题")
@RestController
@RequestMapping("/api/wk/wkKnowledgeIssue")
public class WkKnowledgeIssueController extends BaseController {

    @Autowired
    WkKnowledgeIssueService wkKnowledgeIssueService;

    @GetMapping("/getIssueObject/{id}")
    public Result getIssueObject(@PathVariable("id") String id) {
        return wkKnowledgeIssueService.getIssueObjectById(id);
    }

    @PostMapping("/addKnowledgeIssue")
    public Result addKnowledgeIssue(@RequestBody WkKnowledgeIssue issue){
        return wkKnowledgeIssueService.addKnowledgeIssue(issue);
    }

    @PostMapping("/editKnowledgeIssue")
    public Result editKnowledgeIssue(@RequestBody WkKnowledgeIssue issue){
        return wkKnowledgeIssueService.editKnowledgeIssue(issue);
    }
    @PostMapping("/deletKnowledgeIssue")
    public Result deletKnowledgeIssue(@RequestBody WkKnowledgeIssue issue){
        return wkKnowledgeIssueService.deletKnowledgeIssue(issue);
    }
}
